using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using FutureOpen.Web.Pages;
using FutureOpen.Core.func.sql;
using FutureOpen.Core.func;

public partial class test_MyBlog :PageBase
{
    private int uid;
        
    protected void Page_Load(object sender, EventArgs e)
    {
        base.PageInit();
        if (IsLogin())
            uid = MyUsr;
        uid = 1;

        if (!Page.IsPostBack )
        {
            /*
           
            AspNetPager1.PageSize = PAGE_SIZE;
            AspNetPager1.RecordCount = TopicProvider.GetTopicByUsrTypeCount(uid, TopicProvider.TOPIC_TYPE_BLOG);
            BindBlogs(0);
            */
           
       }
    }

    /*
    protected void lbDeleteBlog_Click(object sender, EventArgs e)
    {
        LinkButton lbt = (LinkButton)sender;
        string id = lbt.CommandArgument;
        int blogid = int.Parse(id);
        TopicProvider.DelTopic(blogid);
        Response.Redirect("MyBlog.aspx");
    }

    protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
    {
        AspNetPager1.CurrentPageIndex = e.NewPageIndex;
        BindBlogs(PAGE_SIZE * (e.NewPageIndex - 1));
    }

    private void BindBlogs(int start)
    {
        DataSet ds = TopicProvider.GetTopicByUsrType(uid, TopicProvider.TOPIC_TYPE_BLOG, start, PAGE_SIZE);
        this.DataList1.DataSource = ds.Tables[0];
        this.DataList1.DataBind();
    }
    */


}
